package com.sc.nft.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sc.nft.enums.PayChannelEnum;
import com.sc.nft.enums.PayMethodEnum;
import com.sc.nft.enums.PayStatusEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class PayOrderVO {
    @ApiModelProperty(value = "退款id")
    private Long id;

    @ApiModelProperty(value = "交易单号")
    private String tradeNo;

    @ApiModelProperty(value = "支付金额")
    private BigDecimal payAmount;

    @ApiModelProperty(value = "退款金额")
    private BigDecimal refundAmount;

    @ApiModelProperty(value = "支付渠道")
    private String channelName;

    @ApiModelProperty(value = "支付类方式")
    private String payTypeName;

    @ApiModelProperty(value = "状态")
    private PayStatusEnum status;

    @ApiModelProperty(value = "支付时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    public void setChannel(PayChannelEnum channel) {
        this.channelName = channel.getDescription();
    }

    public void setPayType(PayMethodEnum payType) {
        this.payTypeName = payType.getDescription();
    }
}
